package utils

import (
	"github.com/gin-gonic/gin"
)

func ResponseSuccess(ctx *gin.Context, data any, msg string) {
	ctx.JSON(200, gin.H{
		"code": 0,
		"data": data,
		"msg":  msg,
	})
}

func ResponseError(ctx *gin.Context, code int, msg string) {
	ctx.JSON(200, gin.H{
		"code": code,
		"data": nil,
		"msg":  msg,
	})
}
